3.381 \(\int (a+b \log (c (d+e x)^n)) (f+g \log (c (d+e x)^n)) \, dx\)

Optimal. Leaf size=110 \[ \frac{d \left (a g+2 b g \log \left (c (d+e x)^n\right )+b f\right )^2}{4 b e g}+x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (g \log \left (c (d+e x)^n\right )+f\right )-n x (a g+b f)-\frac{2 b g n (d+e x) \log \left (c (d+e x)^n\right )}{e}+2 b g n^2 x \]

[Out]

-((b*f + a*g)*n*x) + 2*b*g*n^2*x - (2*b*g*n*(d + e*x)*Log[c*(d + e*x)^n])/e + x*(a + b*Log[c*(d + e*x)^n])*(f
+ g*Log[c*(d + e*x)^n]) + (d*(b*f + a*g + 2*b*g*Log[c*(d + e*x)^n])^2)/(4*b*e*g)

________________________________________________________________________________________

Rubi [A]  time = 0.222167, antiderivative size = 130, normalized size of antiderivative = 1.18, number of steps used = 11, number of rules used = 5, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.172, Rules used = {2430, 2411, 2346, 2301, 2295} \[ x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (g \log \left (c (d+e x)^n\right )+f\right )+\frac{d g \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{2 b e}-a g n x+\frac{b d \left (g \log \left (c (d+e x)^n\right )+f\right )^2}{2 e g}-\frac{2 b g n (d+e x) \log \left (c (d+e x)^n\right )}{e}-b f n x+2 b g n^2 x \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*(d + e*x)^n])*(f + g*Log[c*(d + e*x)^n]),x]

[Out]

-(b*f*n*x) - a*g*n*x + 2*b*g*n^2*x - (2*b*g*n*(d + e*x)*Log[c*(d + e*x)^n])/e + (d*g*(a + b*Log[c*(d + e*x)^n]
)^2)/(2*b*e) + x*(a + b*Log[c*(d + e*x)^n])*(f + g*Log[c*(d + e*x)^n]) + (b*d*(f + g*Log[c*(d + e*x)^n])^2)/(2
*e*g)

Rule 2430

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + Log[(h_.)*((i_.) + (j_.)*(x_))^(m_.)]*
(g_.)), x_Symbol] :> Simp[x*(a + b*Log[c*(d + e*x)^n])^p*(f + g*Log[h*(i + j*x)^m]), x] + (-Dist[g*j*m, Int[(x
*(a + b*Log[c*(d + e*x)^n])^p)/(i + j*x), x], x] - Dist[b*e*n*p, Int[(x*(a + b*Log[c*(d + e*x)^n])^(p - 1)*(f
+ g*Log[h*(i + j*x)^m]))/(d + e*x), x], x]) /; FreeQ[{a, b, c, d, e, f, g, h, i, j, m, n}, x] && IGtQ[p, 0]

Rule 2411

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + (g_.)*(x_))^(q_.)*((h_.) + (i_.)*(x_))
^(r_.), x_Symbol] :> Dist[1/e, Subst[Int[((g*x)/e)^q*((e*h - d*i)/e + (i*x)/e)^r*(a + b*Log[c*x^n])^p, x], x,
d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, n, p, q, r}, x] && EqQ[e*f - d*g, 0] && (IGtQ[p, 0] || IGtQ[
r, 0]) && IntegerQ[2*r]

Rule 2346

Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_.))/(x_), x_Symbol] :> Dist[d, Int[((d
 + e*x)^(q - 1)*(a + b*Log[c*x^n])^p)/x, x], x] + Dist[e, Int[(d + e*x)^(q - 1)*(a + b*Log[c*x^n])^p, x], x] /
; FreeQ[{a, b, c, d, e, n}, x] && IGtQ[p, 0] && GtQ[q, 0] && IntegerQ[2*q]

Rule 2301

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2295

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rubi steps

\begin{align*} \int \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right ) \, dx &=x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )-(b e n) \int \frac{x \left (f+g \log \left (c (d+e x)^n\right )\right )}{d+e x} \, dx-(e g n) \int \frac{x \left (a+b \log \left (c (d+e x)^n\right )\right )}{d+e x} \, dx\\ &=x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )-(b n) \operatorname{Subst}\left (\int \frac{\left (-\frac{d}{e}+\frac{x}{e}\right ) \left (f+g \log \left (c x^n\right )\right )}{x} \, dx,x,d+e x\right )-(g n) \operatorname{Subst}\left (\int \frac{\left (-\frac{d}{e}+\frac{x}{e}\right ) \left (a+b \log \left (c x^n\right )\right )}{x} \, dx,x,d+e x\right )\\ &=x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )-\frac{(b n) \operatorname{Subst}\left (\int \left (f+g \log \left (c x^n\right )\right ) \, dx,x,d+e x\right )}{e}+\frac{(b d n) \operatorname{Subst}\left (\int \frac{f+g \log \left (c x^n\right )}{x} \, dx,x,d+e x\right )}{e}-\frac{(g n) \operatorname{Subst}\left (\int \left (a+b \log \left (c x^n\right )\right ) \, dx,x,d+e x\right )}{e}+\frac{(d g n) \operatorname{Subst}\left (\int \frac{a+b \log \left (c x^n\right )}{x} \, dx,x,d+e x\right )}{e}\\ &=-b f n x-a g n x+\frac{d g \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{2 b e}+x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )+\frac{b d \left (f+g \log \left (c (d+e x)^n\right )\right )^2}{2 e g}-2 \frac{(b g n) \operatorname{Subst}\left (\int \log \left (c x^n\right ) \, dx,x,d+e x\right )}{e}\\ &=-b f n x-a g n x+\frac{d g \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{2 b e}+x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )+\frac{b d \left (f+g \log \left (c (d+e x)^n\right )\right )^2}{2 e g}-2 \left (-b g n^2 x+\frac{b g n (d+e x) \log \left (c (d+e x)^n\right )}{e}\right )\\ \end{align*}

Mathematica [A]  time = 0.0235027, size = 76, normalized size = 0.69 \[ \frac{(d+e x) (a g+b (f-2 g n)) \log \left (c (d+e x)^n\right )+e x (a (f-g n)+b n (2 g n-f))+b g (d+e x) \log ^2\left (c (d+e x)^n\right )}{e} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*(d + e*x)^n])*(f + g*Log[c*(d + e*x)^n]),x]

[Out]

(e*(a*(f - g*n) + b*n*(-f + 2*g*n))*x + (a*g + b*(f - 2*g*n))*(d + e*x)*Log[c*(d + e*x)^n] + b*g*(d + e*x)*Log
[c*(d + e*x)^n]^2)/e

________________________________________________________________________________________

Maple [A]  time = 0.086, size = 156, normalized size = 1.4 \begin{align*} xaf+xag\ln \left ( c \left ( ex+d \right ) ^{n} \right ) -agnx+{\frac{dnag\ln \left ( ex+d \right ) }{e}}+xb\ln \left ( c \left ( ex+d \right ) ^{n} \right ) f-bfnx+{\frac{bdfn\ln \left ( ex+d \right ) }{e}}+bgx \left ( \ln \left ( c{{\rm e}^{n\ln \left ( ex+d \right ) }} \right ) \right ) ^{2}+{\frac{bdg \left ( \ln \left ( c{{\rm e}^{n\ln \left ( ex+d \right ) }} \right ) \right ) ^{2}}{e}}+2\,bg{n}^{2}x-2\,{\frac{bdg{n}^{2}\ln \left ( ex+d \right ) }{e}}-2\,nbgx\ln \left ( c{{\rm e}^{n\ln \left ( ex+d \right ) }} \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*(e*x+d)^n))*(f+g*ln(c*(e*x+d)^n)),x)

[Out]

x*a*f+x*a*g*ln(c*(e*x+d)^n)-a*g*n*x+a*g/e*n*d*ln(e*x+d)+x*b*ln(c*(e*x+d)^n)*f-b*f*n*x+b*f/e*n*d*ln(e*x+d)+b*g*
x*ln(c*exp(n*ln(e*x+d)))^2+b*d*g/e*ln(c*exp(n*ln(e*x+d)))^2+2*b*g*n^2*x-2*n^2*b*d*g/e*ln(e*x+d)-2*n*b*g*x*ln(c
*exp(n*ln(e*x+d)))

________________________________________________________________________________________

Maxima [A]  time = 1.12809, size = 223, normalized size = 2.03 \begin{align*} -b e f n{\left (\frac{x}{e} - \frac{d \log \left (e x + d\right )}{e^{2}}\right )} - a e g n{\left (\frac{x}{e} - \frac{d \log \left (e x + d\right )}{e^{2}}\right )} + b g x \log \left ({\left (e x + d\right )}^{n} c\right )^{2} + b f x \log \left ({\left (e x + d\right )}^{n} c\right ) + a g x \log \left ({\left (e x + d\right )}^{n} c\right ) -{\left (2 \, e n{\left (\frac{x}{e} - \frac{d \log \left (e x + d\right )}{e^{2}}\right )} \log \left ({\left (e x + d\right )}^{n} c\right ) + \frac{{\left (d \log \left (e x + d\right )^{2} - 2 \, e x + 2 \, d \log \left (e x + d\right )\right )} n^{2}}{e}\right )} b g + a f x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(e*x+d)^n))*(f+g*log(c*(e*x+d)^n)),x, algorithm="maxima")

[Out]

-b*e*f*n*(x/e - d*log(e*x + d)/e^2) - a*e*g*n*(x/e - d*log(e*x + d)/e^2) + b*g*x*log((e*x + d)^n*c)^2 + b*f*x*
log((e*x + d)^n*c) + a*g*x*log((e*x + d)^n*c) - (2*e*n*(x/e - d*log(e*x + d)/e^2)*log((e*x + d)^n*c) + (d*log(
e*x + d)^2 - 2*e*x + 2*d*log(e*x + d))*n^2/e)*b*g + a*f*x

________________________________________________________________________________________

Fricas [A]  time = 1.91864, size = 365, normalized size = 3.32 \begin{align*} \frac{b e g x \log \left (c\right )^{2} +{\left (b e g n^{2} x + b d g n^{2}\right )} \log \left (e x + d\right )^{2} -{\left (2 \, b e g n - b e f - a e g\right )} x \log \left (c\right ) +{\left (2 \, b e g n^{2} + a e f -{\left (b e f + a e g\right )} n\right )} x -{\left (2 \, b d g n^{2} -{\left (b d f + a d g\right )} n +{\left (2 \, b e g n^{2} -{\left (b e f + a e g\right )} n\right )} x - 2 \,{\left (b e g n x + b d g n\right )} \log \left (c\right )\right )} \log \left (e x + d\right )}{e} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(e*x+d)^n))*(f+g*log(c*(e*x+d)^n)),x, algorithm="fricas")

[Out]

(b*e*g*x*log(c)^2 + (b*e*g*n^2*x + b*d*g*n^2)*log(e*x + d)^2 - (2*b*e*g*n - b*e*f - a*e*g)*x*log(c) + (2*b*e*g
*n^2 + a*e*f - (b*e*f + a*e*g)*n)*x - (2*b*d*g*n^2 - (b*d*f + a*d*g)*n + (2*b*e*g*n^2 - (b*e*f + a*e*g)*n)*x -
 2*(b*e*g*n*x + b*d*g*n)*log(c))*log(e*x + d))/e

________________________________________________________________________________________

Sympy [A]  time = 1.44923, size = 257, normalized size = 2.34 \begin{align*} \begin{cases} \frac{a d g n \log{\left (d + e x \right )}}{e} + a f x + a g n x \log{\left (d + e x \right )} - a g n x + a g x \log{\left (c \right )} + \frac{b d f n \log{\left (d + e x \right )}}{e} + \frac{b d g n^{2} \log{\left (d + e x \right )}^{2}}{e} - \frac{2 b d g n^{2} \log{\left (d + e x \right )}}{e} + \frac{2 b d g n \log{\left (c \right )} \log{\left (d + e x \right )}}{e} + b f n x \log{\left (d + e x \right )} - b f n x + b f x \log{\left (c \right )} + b g n^{2} x \log{\left (d + e x \right )}^{2} - 2 b g n^{2} x \log{\left (d + e x \right )} + 2 b g n^{2} x + 2 b g n x \log{\left (c \right )} \log{\left (d + e x \right )} - 2 b g n x \log{\left (c \right )} + b g x \log{\left (c \right )}^{2} & \text{for}\: e \neq 0 \\x \left (a + b \log{\left (c d^{n} \right )}\right ) \left (f + g \log{\left (c d^{n} \right )}\right ) & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*(e*x+d)**n))*(f+g*ln(c*(e*x+d)**n)),x)

[Out]

Piecewise((a*d*g*n*log(d + e*x)/e + a*f*x + a*g*n*x*log(d + e*x) - a*g*n*x + a*g*x*log(c) + b*d*f*n*log(d + e*
x)/e + b*d*g*n**2*log(d + e*x)**2/e - 2*b*d*g*n**2*log(d + e*x)/e + 2*b*d*g*n*log(c)*log(d + e*x)/e + b*f*n*x*
log(d + e*x) - b*f*n*x + b*f*x*log(c) + b*g*n**2*x*log(d + e*x)**2 - 2*b*g*n**2*x*log(d + e*x) + 2*b*g*n**2*x
+ 2*b*g*n*x*log(c)*log(d + e*x) - 2*b*g*n*x*log(c) + b*g*x*log(c)**2, Ne(e, 0)), (x*(a + b*log(c*d**n))*(f + g
*log(c*d**n)), True))

________________________________________________________________________________________

Giac [A]  time = 1.25506, size = 289, normalized size = 2.63 \begin{align*}{\left (x e + d\right )} b g n^{2} e^{\left (-1\right )} \log \left (x e + d\right )^{2} - 2 \,{\left (x e + d\right )} b g n^{2} e^{\left (-1\right )} \log \left (x e + d\right ) + 2 \,{\left (x e + d\right )} b g n e^{\left (-1\right )} \log \left (x e + d\right ) \log \left (c\right ) + 2 \,{\left (x e + d\right )} b g n^{2} e^{\left (-1\right )} +{\left (x e + d\right )} b f n e^{\left (-1\right )} \log \left (x e + d\right ) +{\left (x e + d\right )} a g n e^{\left (-1\right )} \log \left (x e + d\right ) - 2 \,{\left (x e + d\right )} b g n e^{\left (-1\right )} \log \left (c\right ) +{\left (x e + d\right )} b g e^{\left (-1\right )} \log \left (c\right )^{2} -{\left (x e + d\right )} b f n e^{\left (-1\right )} -{\left (x e + d\right )} a g n e^{\left (-1\right )} +{\left (x e + d\right )} b f e^{\left (-1\right )} \log \left (c\right ) +{\left (x e + d\right )} a g e^{\left (-1\right )} \log \left (c\right ) +{\left (x e + d\right )} a f e^{\left (-1\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(e*x+d)^n))*(f+g*log(c*(e*x+d)^n)),x, algorithm="giac")

[Out]

(x*e + d)*b*g*n^2*e^(-1)*log(x*e + d)^2 - 2*(x*e + d)*b*g*n^2*e^(-1)*log(x*e + d) + 2*(x*e + d)*b*g*n*e^(-1)*l
og(x*e + d)*log(c) + 2*(x*e + d)*b*g*n^2*e^(-1) + (x*e + d)*b*f*n*e^(-1)*log(x*e + d) + (x*e + d)*a*g*n*e^(-1)
*log(x*e + d) - 2*(x*e + d)*b*g*n*e^(-1)*log(c) + (x*e + d)*b*g*e^(-1)*log(c)^2 - (x*e + d)*b*f*n*e^(-1) - (x*
e + d)*a*g*n*e^(-1) + (x*e + d)*b*f*e^(-1)*log(c) + (x*e + d)*a*g*e^(-1)*log(c) + (x*e + d)*a*f*e^(-1)